Previous Book Contents Book Index Next

Inside Macintosh: QuickTime /
Chapter 2 - Movie Toolbox / Movie Toolbox Reference
Time Base Functions / Creating and Disposing of Time Bases


GetTimeBaseMasterClock

You can use the GetTimeBaseMasterClock function to determine the clock component that is assigned to a time base. A time base derives its time from either a clock component or from another time base. If a time base derives its time from a clock component, you can use this function to obtain the component instance of the clock component.

pascal ComponentInstance GetTimeBaseMasterClock (TimeBase tb);
tb
Specifies the time base for this operation. Your application obtains this time base identifier from the NewTimeBase function (described on page 2-297).
DESCRIPTION
The GetTimeBaseMasterClock function returns a reference to a component instance of the clock component that provides a time source to this time base.

Note
The Component Manager allows a single component to serve multiple client applications at the same time. Each client application has a unique access path to the component. These access paths are called connections. You identify a component connection by specifying a component instance. The Component Manager provides this component instance to your application when you open a connection to a component. The component maintains separate status information for each open connection.
Do not close this connection--the time base is using the connection to maintain its time source. If a clock component is not assigned to the time base, this function sets the returned reference to nil. In this case, the time base relies on another time base for its time source. Use the GetTimeBaseMasterTimeBase function, which is described on page 2-302, to obtain the time base reference to that master time base.

ERROR CODES
None

SEE ALSO
You can use the SetTimeBaseMasterClock function, which is described on page 2-299, to assign a clock component to a time base.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
6 JUL 1996